# 1. setup 3rd-party dependencies
message(STATUS "Setting up OpenCV libs for: ${CMAKE_CURRENT_SOURCE_DIR}")

if (WIN32)
    set(OpenCV_DIR E:/test/3rd/opencv3.4.16/opencv/build)
elseif(USE_RKNN)     
    set(OpenCV_DIR /root/weiwei/3rd/opencv-3.4.16/arm_build/install/share/OpenCV) #目录包含OpenCVConfig.cmake
else()     
    set(OpenCV_DIR /root/weiwei/3rd/opencv-3.4.16/build/install/share/OpenCV)   
endif ()

message(STATUS "Find OpenCV libs, OpenCV_DIR: [${OpenCV_DIR}]")

find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
list(APPEND LINK_LIBS ${OpenCV_LIBS})

# include_directories(${OpenCV_DIR}/include)
# set(OpenCV_LIBS -L${OpenCV_DIR}/lib -lopencv_imgproc -lopencv_core )

message(STATUS "Setting up OpenCV libs done! OpenCV_LIBS:+[${OpenCV_LIBS}]")
